package cn.zsb;

import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.util.Date;

@SpringBootApplication//(exclude = {RedisAutoConfiguration.class, MybatisAutoConfiguration.class})
@MapperScan("cn.zsb.dao")
@EnableScheduling//
//@ImportResource("xxx.xml")
//@ServletComponentScan("cn.zsb.servlet")
public class SpringbootApplication {
    public static void main(String[] args) {

        ConfigurableApplicationContext applicationContext = SpringApplication.run(SpringbootApplication.class, args);
        //System.out.println(applicationContext.getBeanDefinitionNames());
    }


    @Scheduled(cron = "*/20 * * * * *")
    public void dingshi(){
        System.out.println("定时执行："+new Date());
    }
}
